package com.yx.coredata.common.result;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by lichagnfeng on 2017/2/27.
 */
public class JsonListResult<T> extends JsonResult implements Serializable {

    private static final long serialVersionUID = 1L;
    private List<T> items;

    public JsonListResult(List<T> items) {
        this(true, "", items);
    }

    public JsonListResult(List<T> items, String message) {
        this(true, message, items);
    }

    public JsonListResult(boolean status, String message) {
        this(status, message, new ArrayList(0));
    }

    public JsonListResult(boolean status, String message, List<T> items) {
        super(status, message);

        //绑定集合
        this.items = items;
    }

    /**
     * 获取数据列表。
     *
     * @return 集合
     */
    public List<T> getItems() {
        return items;
    }

}
